package cn.hist.hfp.repository;

import cn.hist.hfp.entity.Business;
import cn.hist.hfp.entity.BusinessProvider;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface BusinessProviderRepository extends JpaRepository<BusinessProvider, Integer> {

    Page<BusinessProvider> findAllByCityAndBusinesses(String city, Business business, Pageable pageable);

    Page<BusinessProvider> findAllByCity(String city, Pageable pageable);

    Page<BusinessProvider> findAllByBusinesses(Business business, Pageable pageable);
}
